package com.fyi.service.impl;

import com.fyi.entity.Message;
import com.fyi.mapper.MessageMapper;
import com.fyi.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessageServiceImpl implements MessageService {

    @Autowired
    private MessageMapper messageMapper;
    public List<Message> selectAllMessage() {
        return messageMapper.selectAllMessage();
    }

    public Message selectMesById(Integer id) {
        return messageMapper.selectMesById(id);
    }

    public Integer addMessage(Message message) {
        return messageMapper.addMessage(message);
    }

    public Integer updateMessage(Message message) {
        return messageMapper.updateMessage(message);
    }

    public Integer deleteMessage(Integer id) {
        return messageMapper.deleteMessage(id);
    }
}
